package com.jiuyuan.utils;

import com.jiuyuan.entity.Admin;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @program: hrms
 * @description:
 * @author: Feng
 * @create: 2023-02-17 10:22
 **/

public class AdminUtils {
    public static Admin getCurrentAdmin(){
        return (Admin) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
